package it.polimi.swKnights.SWIMv2.ejb.helpRequest;

import it.polimi.swKnights.SWIMv2.ejb.exceptions.InvalidLoginPrivilegesException;
import it.polimi.swKnights.SWIMv2.ejb.exceptions.LoginFailException;

import java.util.List;
import java.util.Map;

import javax.ejb.Remote;
import javax.persistence.EntityNotFoundException;

@Remote
public interface SeeHelpRequestRemote {
	/**
	 * 
	 * @param username of the user of the current session, the person WHO WAS ASKED TO help
	 * the asnwering user, the hero one
	 * @param password
	 * @return  list of help-requests in form of list (many requests)  of map (title, description)
	 * that is: all the request in which the user were the anwering user
	 * @throws EntityNotFoundException if data are bed
	 * @throws LoginFailException 
	 */
	public List<Map<String, String>> getHelpRequests(String username, String password)
			throws EntityNotFoundException,
			InvalidLoginPrivilegesException, LoginFailException;
	
	
	/**
	 * 
	 * @param username of the user of the current session, the person who HAS ASKED FOR help
	 * the asking user, the needy one
	 * @param password
	 * @return  list of help-requests in form of list (many requests)  of map (title, description)
	 * that is: all the request in which the user were the asking user
	 * @throws EntityNotFoundException if data are bad
	 * @throws LoginFailException 
	 */
	public List<Map<String, String>> getHelRequests(String username, String password, String userNameHelped)
			throws EntityNotFoundException,
			InvalidLoginPrivilegesException, LoginFailException;


	public List<Map<String, String>> getAcceptedHelpRequests(String username,
			String password) 	throws EntityNotFoundException,
			InvalidLoginPrivilegesException, LoginFailException;
	
	
}
